package _Pan3D.display3D.analysis
{
	import _Pan3D.base.MeshData;
	import _Pan3D.base.ObjData;

	/**
	 * @author MSN:liuyan3757@163.com  QQ: 421537900
	 */
	public class AnalysisServer
	{
		private var _md5Analysis:Md5Analysis;
		private var _md5AnimAnlysis:Md5animAnalysis;
		private var _objAnalysis:ObjAnalysis;
		
		private static var instance:AnalysisServer;
		public function AnalysisServer()
		{
			_md5Analysis = new Md5Analysis;
			_md5AnimAnlysis = new Md5animAnalysis;
			_objAnalysis = new ObjAnalysis;
		}
		
		public static function getInstance():AnalysisServer{
			if(!instance){
				instance = new AnalysisServer();
			}
			return instance;
		}
		
		public function analysisMesh(str:String):MeshData{
			trace("mesh解析")
			return _md5Analysis.addMesh(str,1);
		}
		
		public function analysisAnim(str:String):Array{
			_md5AnimAnlysis.addAnim(str);
			return _md5AnimAnlysis.allFrames;
		}
		
		public function analysisObj(str:String):ObjData{
			return _objAnalysis.analysis(str);
		}
		
	}
}